package ninja.awesome.game;

import ninja.awesome.framework.Input.TouchEvent;
import android.graphics.Rect;

public class Utils {
	public static boolean inBounds(TouchEvent event, int x, int y, int width, int height) {
		if (event.x > x && event.x < x + width - 1 && event.y > y && event.y < y + height - 1)
			return true;
		else
			return false;
	}

	public static boolean inBounds(TouchEvent event, Rect rect) {
		if (event.x > rect.left && event.x < rect.left + rect.width() - 1 && event.y > rect.top && event.y < rect.top + rect.width() - 1)
			return true;
		else
			return false;
	}
}
